ParaView

2021-06-26

  • 1 Basics
  • 2 Advanced
    • 2.1 pvpython
      • 2.1.1 SaveAnimation does not save all the frames in the batch mode
      • 2.1.2 Screenshot disables the font scaling
      • 2.1.3 Module not found

1 Basics

2 Advanced

2.1 pvpython

2.1.1 SaveAnimation does not save all the frames in the batch mode

In the interactive mode, SaveAnimation works. However, in the batch mode, SaveAnimation saves only 10 frames because the default mode is the Sequence mode. This mode defaults to 10 frames, and interpolates time at 10 evenly spaced increments between the start and end time of your sequence. The correct fix is to set

animScene = GetAnimationScene()
animScene.PlayMode’=‘Snap To TimeSteps’

before calling SaveAnimation().

2.1.2 Screenshot disables the font scaling

Specify the FontScaling parameter.

SaveScreenshot(fig_fpath, renderView1, ImageResolution=[1504, 754], FontScaling='Do not scale fonts')

2.1.3 Module not found

Modules installed by pip not found by pvpython.

import sys
sys.path.append('/home/jcshi/Softwares/Python/lib/python3.8/site-packages')
from tqdm import tqdm
.
Created on 2021-06-26 with pandoc